import request from '@/utils/request'

// 查询优惠政策列表
export function listFavouredPolicy(query) {
  return request({
    url: '/payfee/favouredPolicy/list',
    method: 'get',
    params: query
  })
}

// 查询优惠政策详细
export function getFavouredPolicy(favouredPolicyId) {
  return request({
    url: '/payfee/favouredPolicy/' + favouredPolicyId,
    method: 'get'
  })
}

// 新增优惠政策
export function addFavouredPolicy(data) {
  return request({
    url: '/payfee/favouredPolicy',
    method: 'post',
    data: data
  })
}

// 修改优惠政策
export function updateFavouredPolicy(data) {
  return request({
    url: '/payfee/favouredPolicy',
    method: 'put',
    data: data
  })
}

// 删除优惠政策
export function delFavouredPolicy(favouredPolicyId) {
  return request({
    url: '/payfee/favouredPolicy/' + favouredPolicyId,
    method: 'delete'
  })
}

// 导出优惠政策
export function exportFavouredPolicy(query) {
  return request({
    url: '/payfee/favouredPolicy/export',
    method: 'get',
    params: query
  })
}

// 修改优惠政策状态
export function updateStatus(data) {
  return request({
    url: '/payfee/favouredPolicy/updateStatus',
    method: 'put',
    data: data
  })
}
